Cache management in rdma distributed key/value stores based on atomic operations

ABSTRACT

A cache management system performs cache management in a Remote Direct Memory Access (RDMA) key value data store. The cache management system receives a request from at least one client configured to access a data item stored in a data location of a remote server, and determines a popularity of the data item based on a frequency at which the data location is accessed by the at least one client. The system is further configured to determine a lease period of the data item based on the frequency and assigning the lease period to the data location.

BACKGROUND

The present invention relates generally to cache management and moreparticularly to cache management in a Remote Direct Memory Access (RDMA)data store.

RDMA is a data computing technique whereby data is fetched directly outof a host computer's memory and directly placed into the memory of aclient without requiring the processor of the host computer to processthe read request. In this manner, RDMA allows for bypassing theoperating system of the host computer and avoids intermediate datacopies in memory of the host computer. Accordingly, RDMA significantlyreduces the load on the processor of the host computer for large datatransfers and provides high throughput with low latency.

Resource reclamation of the cache is typically achieved by evicting orpurging key/value items that are no longer relevant. The relevancy of akey/value item stored in the cache may be determined based on thefrequency rate at which a particular key/value item is accessed.However, one consequence resulting from RDMA for cache data storage isthat the host computer is not made aware of the accesses conducted byclients. Thus, it is not possible for the host computer to track howfrequently each of the data items stored in the cache are accessed. Thislack of information can lead to the host computer performing undesiredevictions of data items from the cache if traditional cache managementalgorithms, e.g., LRU, CLOCK, are used. That is, the host computer maynot be aware of the frequency rate at which one or more clients receiverequests to fetch one or more particular key/value items in the cache.Therefore, the host computer may not be able to properly determine aproper lease time for the key/value items stored in the cache.Consequently, lease terms may be inappropriately defined, i.e., may betoo short or too long. To compensate for the lack of information, somesolutions instruct computers to inform the host computer of all cachedata accesses. However, this approach generates a large number ofmessages that need to be processed by the host computer causingsignificant reduction in the performance benefits of RDMA.

SUMMARY

According to a non-limiting embodiment, a cache management systemperforms cache management in a Remote Direct Memory Access (RDMA) keyvalue data store. The cache management system receives a request from atleast one client configured to access a data item stored in a datalocation of a remote server, and determines a popularity of the dataitem based on a frequency at which the data location is accessed by theat least one client. The system is further configured to determine alease period of the data item based on the frequency and assigning thelease period to the data location.

According to another non-limiting embodiment, a method of performingcache management in a Remote Direct Memory Access (RDMA) key value datastore comprises receiving a request from at least one client configuredto access a data item stored in a data location of a remote server, anddetermining a popularity of the data item based on a frequency at whichthe data location is accessed by the at least one client. The methodfurther includes calculating a lease period of the item based on thefrequency and assigning the lease period to the data location.

According to yet another non-limiting embodiment, a computer programproduct performs a cache management in a Remote Direct Memory Access(RDMA) key value data store. The computer program product comprises atangible storage medium readable by an electronic processing circuit.The tangible storage medium stores instructions for execution by theprocessing circuit so as to perform a method including operationscomprising: receiving a request from at least one client configured toaccess a data item stored in a data location of a remote server,determining a popularity of the data item based on a frequency at whichthe data location is accessed by the at least one client, andcalculating a lease period of the item based on the frequency andassigning the lease period to the data location.

According to still another non-limiting embodiment, a cache managementsystem is configured to perform cache management in a Remote DirectMemory Access (RDMA) key value data store. The cache management systemcomprises an electronic data server including at least one data locationconfigured to store a data item, and at least one electronic clientlocated remotely from the data server. The at least one client isconfigured to access to the data item stored in the data location usinga RDMA remote pointer. The server determines a popularity of the dataitem based on a frequency at which the data location is accessed by theat least one client, and calculates a lease period of the data itembased on the frequency and assigning the lease period to the datalocation.

Additional features are realized through the techniques of the variousnon-limiting embodiments. Other embodiments are described in detailherein and are considered a part of the claimed invention. For a betterunderstanding of the invention with the features, refer to thedescription and to the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a cache management systemconfigured to perform cache management of an RDMA key/value data storeaccording to a non-limiting embodiment;

FIG. 2 is a block diagram illustrating a computing system implementing acache management system configured to perform cache management of anRDMA key/value data store according to a non-limiting embodiment;

FIG. 3 is a block diagram illustrating, a cache management system usingRDMA remote pointers to perform cache management of an RDMA key/valuedata store is illustrated according to a non-limiting embodiment;

FIG. 4 is a block diagram illustrating a client performing an atomicfetch/add operation to update the access frequency rate correspondingdata location stored in a server according to a non-limiting embodiment;

FIG. 5 are flow diagrams illustrating a method of operating a clientincluded in a cache management system configured to perform cachemanagement of an RDMA key/value data store according to a non-limitingembodiment; and

FIG. 6 are flow diagrams illustrating a method of operating a serverincluded in a cache management system configured to perform cachemanagement of an RDMA key/value data store according to a non-limitingembodiment.

DETAILED DESCRIPTION

Various embodiments described herein provide a system that performscache management for Remote Direct Memory Access (RDMA) key/value datastore based on atomic operations. According to a non-limitingembodiment, the cache management system leverages the advantage ofco-designing the servers and clients such that clients can periodicallypropagate necessary access frequency rates to one or more servers. Theaccess frequency rate is added to a register i.e., data location, in theserver according to various atomic operations that may occursimultaneously or in sequence but without interruption for a specifictask to be accomplished properly. For instance, the atomic operationsexecuted by the cache system may leverage fetch/add operations performedby each individual client so as to add and replace values into a datalocation stored in the server intended to store the access frequencyrate of a particular key/value item. In this manner, the servers canmonitor the data location that includes the dynamically changing accessfrequency rate and maintain global access patterns of cached data.

In addition, the cache management system according to a non-limitingembodiment determines lease time to manage data items, and alsodynamically determines the lease times for different items according totheir rate of access as well as the operation types. The lease timestands as a pact between server and client to guarantee the availabilityof the data so that clients can efficiently retrieve the data by usingRDMA Read, while also preventing premature eviction and reclamation ofkey/value items stored in the cache. In this manner, the cachemanagement system according to various embodiments is capable ofspecifically keeping track of the access frequency of the cached datathereby incurring very little overhead while also preserving thevalidity of key/value items in the cache.

With reference now to FIG. 1, a cache management system 100 configuredto perform cache management for Remote Direct Memory Access (RDMA)key/value data store based on atomic operations is illustrated accordingto a non-limiting embodiment. The cache management system 100 includesone or more remote computers, i.e., clients 102 in signal communicationwith a host computer 110. The clients 102 are configured to access acache 112 stored on a host computer 110 by executing various atomicoperations. The atomic operations may comprise a group of operationsthat may occur simultaneously or in sequence but without interruptionfor a specific task to be accomplished properly. For instance, atomicoperations may be implemented in spin-locks inside of an operatingsystem and/or monotonically incrementing sequence numbers. Atomicoperations may include the examination of data, conditional orunconditional modification of data, and/or placement of a new value oritem into a data location in the cache 112 using, for example, an atomicfetch and add (i.e. fetch/add) operation. The atomic operations may alsoinclude returning a response on the result of the operation withprevious or subsequent values of the data or the like. In non-limitingembodiments, the host computer 110 utilizes RDMA cache managementoperations to allow each of the clients 102 to access data stored in thecache 112 without requiring the CPU 114 of the host computer 110 toprocess the read request.

In non-limiting embodiments, when a client 102 requests access to a dataitem from cache 112 of the host computer 110 for the first time, thehost computer 110 returns a remote pointer to the data item in the cacheof the client. The remote pointer indicates the location of the dataitem inside of the cache 112. Once the client 102 has a remote pointer,an RDMA read can be used to retrieve the data item without requiring anyaction by the CPU 114 of the host computer 110.

In non-limiting embodiments, in response to receiving an access requestfrom a client 102, the host computer 110 computer enters into a leasewith the client 102 for the requested data item. The lease is anagreement between host computer 110 and client 102 that grants theclient 102 the privilege to conduct RDMA reads and guarantees theavailability of the data item until an expiration time. In non-limitingembodiments, the host computer maintains a global view of accesspatterns of data items stored in the cache by assigning a lease to everyone of the data items stored in the cache. In non-limiting embodiments,while the lease grants the holder the privilege to conduct RDMA read, itmay not grant the holder the privilege to update the data item.

In non-limiting embodiments, the term, or length, of the lease may bedetermined by the access history of the data item. In general, the useof a single fixed lease term for all of the data items is inefficientbecause long-lease term can cause cache to be populated with unpopularitems and short-lease term can cause frequent remote pointerinvalidation, thus low utilization of RDMA. In non-limiting embodiments,assigning longer term leases to data items exhibiting frequent reads ismore beneficial than doing so for items with frequent updates but fewerreads. In non-limiting embodiments, the lease term for each item shallbe determined by considering several factors which include, but are notlimited to, an operation event for a data item, and an access frequencyof a data item.

In non-limiting embodiments, every time an operation that the hostcomputer is aware of, such as a (e.g., read, write or update) thataccesses the data item, the lease may be extended by a time period. Inone embodiment, the lease extension may be calculated by lease=now+termto prevent lease from being extended without limit when a large numberof clients access the data simultaneously. The host computer may embedthe extended lease term in the returning values to inform the client thevalid time range during which RDMA read can be applied to fetch thedata.

FIG. 2 illustrates a block diagram of a non-limiting computer system 200for use with the teachings herein. The methods described herein can beimplemented in hardware software (e.g., firmware), or a combinationthereof. In a non-limiting embodiment, the methods described herein areimplemented in hardware, and is part of the microprocessor of a specialor general-purpose digital computer, such as a personal computer,workstation, minicomputer, mainframe computer, or computer serversystem. The system 200 therefore includes general-purpose computer 201.

In a non-limiting embodiment, in terms of hardware architecture, asshown in FIG. 2, the computer 201 includes a processor 205, memory 210coupled via a memory controller 215, a storage device 220, and one ormore input and/or output (I/O) devices 240, 245 (or peripherals) thatare communicatively coupled via a local input/output controller 235.According to a non-limiting embodiment, the computer 201 is configuredas a host server capable of operating with one or more remote computers,i.e., clients 102, to perform cache management for an RDMA key/valuedata store according to a non-limiting embodiment.

The input/output controller 235 can be, for example, but not limited to,one or more buses or other wired or wireless connections, as is known inthe art. The input/output controller 235 may have additional elements,which are omitted for simplicity, such as controllers, buffers (caches),drivers, repeaters, and receivers, to enable communications. Further,the local interface may include address, control, and/or dataconnections to enable appropriate communications among theaforementioned components. The storage device 220 may include one ormore hard disk drives (HDD), solid state drives (SSD), or any othersuitable form of storage.

The processor 205 is a computing device for executing hardwareinstructions or software, particularly that stored in memory 210. Theprocessor 205 can be any custom made or commercially availableprocessor, a central processing unit (CPU), an auxiliary processor amongseveral processors associated with the computer 201, a semiconductorbased microprocessor (in the form of a microchip or chip set), amicroprocessor, or generally any device for executing instructions. Theprocessor 205 may include a cache 270, which may be organized as ahierarchy of more cache levels (L1, L2, etc.). One or more remotecomputers i.e., clients 102, is in signal communication with thecomputer 201 via the network 265. In this manner, the clients 102 mayperform RDMA so as to fetch/add data or items directly from/to one ormore data locations of the host computer 201 without requiring theprocessor of the host computer 201 to process the read request.

The memory 210 can include any one or combination of volatile memoryelements (e.g., random access memory (RAM, such as DRAM, SRAM, SDRAM,etc.)) and nonvolatile memory elements (e.g., ROM, erasable programmableread only memory (EPROM), electronically erasable programmable read onlymemory (EEPROM), programmable read only memory (PROM), tape, compactdisc read only memory (CD-ROM), disk, diskette, cartridge, cassette orthe like, etc.). Moreover, the memory 210 may incorporate electronic,magnetic, optical, and/or other types of storage media. Note that thememory 210 can have a distributed architecture, where various componentsare situated remote from one another, but can be accessed by theprocessor 205.

The instructions in memory 210 may include one or more separateprograms, each of which comprises an ordered listing of executableinstructions for implementing logical functions. In the example of FIG.2, the instructions in the memory 210 include a suitable operatingsystem (OS) 211. The operating system 211 essentially controls theexecution of other computer programs and provides scheduling,input-output control, file and data management, memory management, andcommunication control and related services.

In a non-limiting embodiment, a conventional keyboard 250 and mouse 255can be coupled to the input/output controller 235. Other output devicessuch as the I/O devices 240, 245 may include input devices, for examplebut not limited to a printer, a scanner, microphone, and the like.Finally, the I/O devices 240, 245 may further include devices thatcommunicate both inputs and outputs, for instance but not limited to, anetwork interface card (NIC) or modulator/demodulator (for accessingother files, devices, systems, or a network), a radio frequency (RF) orother transceiver, a telephonic interface, a bridge, a router, and thelike. The system 200 can further include a display controller 225coupled to a display 230. In a non-limiting embodiment, the system 200can further include a network interface 260 for coupling to a network165.

The network 265 can be an IP-based network for communication between thecomputer 201 and any external server, client and the like via abroadband connection. The network 265 transmits and receives databetween the computer 201 and external systems. In a non-limitingembodiment, the network 265 can be a managed IP network administered bya service provider. The network 265 may be implemented in a wirelessfashion, e.g., using wireless protocols and technologies, such as Wi-Fi,WiMax, etc. The network 265 can also be a packet-switched network suchas a local area network, wide area network, metropolitan area network,Internet network, or other similar type of network environment. Thenetwork 265 may be a fixed wireless network, a wireless local areanetwork (LAN), a wireless wide area network (WAN) a personal areanetwork (PAN), a virtual private network (VPN), intranet or othersuitable network system and includes equipment for receiving andtransmitting signals.

If the computer 201 is a PC, workstation, intelligent device or thelike, the instructions in the memory 210 may further include a basicinput output system (BIOS) (omitted for simplicity). The BIOS is a setof essential routines that initialize and test hardware at startup,start the OS 211, and support the transfer of data among the storagedevices. The BIOS is stored in ROM so that the BIOS can be executed whenthe computer 201 is activated. When the computer 201 is in operation,the processor 205 is configured to execute instructions stored withinthe memory 210, to communicate data to and from the memory 210, and togenerally control operations of the computer 201 pursuant to theinstructions.

Turning now to FIG. 3, a cache management system 300 configured toperform cache management for an RDMA key/value data store is illustratedaccording to a non-limiting embodiment. According to a non-limitingembodiment, the cache management system 300 is designed according to anon-uniform memory access (NUMA) architecture to facilitate RDMAkey/value data store operation. The cache management system 300 may alsobe implemented in a general-purpose in-memory key-value middleware, orhydra database (HydraDB). A HydraDB synthesizes a collection ofstate-of-the-art techniques, including, but not limited to, continuousfault-tolerance, Remote Direct Memory Access (RDMA), and awareness formulticore systems, to deliver a high-throughput, low-latency accessservice in a reliable manner for cluster computing applications.

The cache management system 300 includes a server 302 in signalcommunication with one or more remote client nodes 304 a-304 b. Theserver 302 includes one or more data locations 306 a-306 b, and anelectronic computer processor 308 configured to access the datalocations 306 a-306 b. When accessing the data locations 306 a-306 b,the computer processor 308 can read and/or write data thereto. Accordingto a non-limiting embodiment, the computer processor 308 is configuredas an electronic node manager agent 308 capable of accessing andprocessing various data locations and managing the server 302.

The clients 304 a-304 b utilize a remote pointer 310 a-310 b to directlyaccess the data locations 306 a-306 b located on a remote node of theserver 302. According to a non-limiting embodiment, the server 302exports a remote pointer 310 a to a client 302 a that refers to a datavalue or item in a pinned and registered data location 306 a stored inthe memory of the server 302. The data values or items stored in thedata location 306 a of the server 302 provide a cache. Thus, RDMAoperations allow the clients 304 a-304 b to directly access a value oritem stored in a corresponding data locations of the server 302 using arespective remote pointer 408 a-408 b to reduce overhead and latency.

According to a non-limiting embodiment, the client 304 a-304 b remotelycontrols the RDMA of the server 302. For example, a remote pointer 310 ais retrieved from the memory of the client 304 a-304 b. A particularclient 304 a-304 b then transmits a respective remote pointer 310 a-310b to the server 302. The remote point includes a hash designating a keyand value <key,value> corresponding to a particular data location 306that stores a value that is requested by the client. If the <key,value>designated by the remote pointer 310 a-310 b is valid and exists, theclient 310 a-310 b performs DMA (direct memory access) operations so asto transfer data values into and out of the memory of the Server 302.

These RDMA operations do not require execution of any software in theserver 302 or 304 a-304 b, and thus there is no involvement from theserver computer or node manager agent 308 and no central processing unit(CPU) utilization by the server 302 or client 304 a-304 b to perform theRDMA operations. The RDMA operations therefore result in very fast, nearwire-speed, remote access by the clients 304 a-304 b into and out of thememory of the server 302 (and similarly, remote access by the server 302into and out of the memory of the clients 304 a-304 b). For example, anadd/fetch operations performed by the clients 304 a-304 b of a datavalue stored in the memory of the server 302 can occur withinsingle-digit microseconds, for example.

According to a non-limiting embodiment, a hash map is used with the RDMAoperations. The server 302 creates the hash map to store the remotepointers 310 a-310 b and publishes or exports the hash maps to theclients 304 a-304 b. Each entry or slot in the hash map is associatedwith a key for a record and stores an object-value corresponding to thedata value stored in a corresponding data location 306 a-306 b. Theserver 302 publishes the hash map to one or more clients 304 a-304 b atsome designated time, e.g., at client startup, at server startup, whenthe hash map changes, upon request, at certain intervals, etc.,(represented by arrow 1). The clients 304 a-304 b received the remotepointer and stored the hash <key, value> in the client memory.

The servers 304 a-304 b can also utilize a message-based interfacesupported by RDMA operations to communicate (i.e., send and receivedata) with the server 302. The message-based interface may beestablished using various protocols including, but not limited to,transmission control protocol/internet protocol (TCP/IP). For instance,the servers 304 a-304 b send a notification request (represented byarrow 2) to request remote pointers 310 a-310 b from the server 302. Thenotification request is relayed by a server shard, and the client copyof the hash map is processed (represented by arrow 3) to locally look upremote pointers 310 a-310 b based on the keys in order to perform CRUD(Create, Read, Update, Delete) operations using RDMA on data valuesstored in the data locations 306 a-306 b of the server 302. In response,the server 302 replies (represented by arrow 4) to the clientnotifications by sending a hash map including the current hash<key,value> requested by the client 304 a-304 b. In addition, the server302 can multicast full or incremental updates of the hash map to theclients 304 a-304 b at a designated time, e.g., when the hash mapchanges due to creation and deletion operations.

As further illustrated in FIG. 3, one or more node manager agents 308constructed as a hardware computer processor, for example, areconfigured to access the data locations 306 a-306 b. The node manageragent 308 uses a management key as an access control mechanism. When thenode manager agents 308 control of a data location 306 a-306 b, the nodemanager agents 308 assigns its management key, along with a leaseperiod, to each a respective data location 306 a-306 b. The lease periodserves as an agreement which allows the remote clients 304 a-304 b toperform RDMA accesses on a corresponding data location 306 a-306 bstoring an item or value of interest until the lease period expires.Accordingly, the node manager agent 308 uses the management key tovalidate all future packets it receives within the lease period. If amanagement key field in a subnet management packet matches themanagement key value of the corresponding data locations 306 a-306 b,the packet is accepted. Otherwise the packet is discarded.

The RDMA architecture supports the notion of multiple node manageragents 308 and specifies how multiple node manager agents 308 negotiatefor one to become a master node manager agent 308 of a particular datalocation 306 a-306 b. Once a node manager agent 308 gains control of adata location 306 a-306 b, it can retain control as long as it does notlose its management key of the data location 306 a-306 b. Loss of themanagement key can happen under several circumstances. This loss canhappen through a power cycle of the component which contains themanagement key, with the component coming up with the default managementkey when the power to the component is restored. This loss also mayhappen when the management key lease period expires, in which thecorresponding data location 306 a-306 b can be reclaimed by the server302. Therefore, at least one embodiment provides a feature ofdynamically tuning the lease period to prevent premature data locationreclamation, and balance the trade-off between cache utilization andperformance requirement.

According to a non-limiting embodiment, the cache management system 300determines a popularity of the data locations 306 a-306 b to dynamicallycalculate the lease terms. The popularity of a particular data location306 a-306 b is based on the frequency at which a particular datalocation 306 a-306 b is accessed by one or more clients 304 a-304 b.This frequency will be referred to as the access frequency rate. Inorder to provide an accurate frequency rate that takes into account themultitude of clients 306 a-306 b that may access a particular datalocation 306 a-306 b, an RDMA atomic operation referred to going forwardas a “fetch/add” operation is performed. The atomic fetch/add operationcan occur simultaneously or in sequence but without interruption for aspecific task to be accomplished properly.

For instance, atomic operations may be implemented in spin-lockoperations inside of an operating system and/or monotonicallyincrementing sequence numbers. In any instance, the fetch/add operationcan be executed concurrently so as to update values in a data locationat the same time while providing logically correct decisions withoutinadvertently overwriting data in the data location. That is, unlikenon-atomic read/write operations performed according to TCP/IPprotocols, for example, the atomic fetch/add operations executed by thecache management system 300 allows for simultaneous operations withoutintermediate interruption. Accordingly, the server 302 may include aseparate frequency data location (not shown in FIG. 3) which isdynamically updated with access frequency rate data using the atomicfetch/add operations. In this manner, the server 302 can continuously beaware of the popularity of a particular data location and dynamicallytune the corresponding lease period. That is, as the access frequencyrate of a data location increases (e.g., the access frequency rateincreases), the server 302 increases the duration of the lease period.As the popularity of the data location decreases (e.g., the accessfrequency rate decreases), the server 302 reduces the correspondinglease period.

Turning to FIG. 4, a block diagram illustrates a client 304 performingan atomic fetch/add operation to update the access frequency ratecorresponding data location stored in a server 302 according to anon-limiting embodiment. The server 302 and the client 304 includeadditional components to facilitate the fetch/add operation. The server302 includes a frequency data location 400 configured to store a remoteaccess value (Rem_Access_Val) indicative of the access frequency datacorresponding to a particular data location 310 accessed by one or moreclients 304. The client 304 includes an incrementing module 402 and alocal data location 404.

In the event the client 304 needs to access the data location 310defined by the remote pointer <key,value>, the client 304 determines anadjustment (i.e., an increment or a decrement) to be applied to thecurrent Rem_Access_Val (i.e., the current access frequency data) asdescribed above. The fetch/add operation then applies the determinedadjustment atomically, and returns the previous value if the particularclient 304 was the only client (among a plurality of clients) to accessthe location at that time. If the location undergoes multiple concurrentaccesses, then the client 304 returns one of the logical intermediatevalues. Thus, the updated Rem_Access_Val can be simultaneously added tothe frequency data location 400 and the local data location 404. In thismanner, the clients 304 can dynamically track the access frequency ratelocally, while the node manager agent 308 can continuously monitor thefrequency data location 400 stored in the server 302 to determine theaccess frequency rate of the corresponding data location 310.Accordingly, the node manager agent 308 can monitor the popularity ofthe data location 310, and in response dynamically tunes the leaseperiod assigned to the data location 310. Although the operation of asingle client 304 is illustrated in FIG. 4, it should be appreciatedthat the cache management system 300 may include a multitude of clients304 performing similar atomic fetch/add operations to continuouslyadding its local contribution to the frequency data location 400 of theserver 302. In addition, the server 302 may add its contribution to thefrequency data 400. Accordingly, the access frequency rate data storedin the frequency data location 400 can be viewed as global informationaccessible by the server 302 and each client 304 in the cache managementsystem 300.

According to a non-limiting embodiment, the Rem_Access_Val stored in thefrequency data location 400 is based on an access frequency ratedifferential (Δf). More specifically, a first access frequency rate (f1)during a first time period (T1) is determined by a client 304. That is,the client may determine f1 based on the number of times the client isrequested to access the data location 306 during T1. The time period canbe any time period (e.g., 1 millisecond, 1 second, 1 minute, etc.) thatallows for determining the trend of the access frequency ratecorresponding to a particular data location 310. At startup, forexample, each client 304 included in the cache management system 300 mayadd an initial f1 without performing a differential calculation so as tocreate an initial access frequency reference value.

After T1 expires, the client 304 determines a second access frequencyrate (f2) during the following time period (T2). The client 304 thencalculates the Δf based on the difference between f2 and f1. If Δf ispositive, then client 304 increments Rem_Access_Val with the current Δfvalue. If, however, Δf is negative, then the client 304 decrementsRem_Access_Val by the current Δf value. In at least one embodiment, aclient 304 decides not update the frequency data location 400 when Δf isdetermined to be zero. Accordingly, the server 302 can maintain a sum ofthe access frequency rates contributed by all clients 304 included inthe cache management system 300. In this manner, the server 302 candynamically tune the lease period corresponding to the data location 310based on the access frequency rate sum stored in the frequency datalocation 400 at any moment.

According to a non-limiting embodiment, each client 304 may ultimatelydetermine whether to add the current Δf to the frequency data location400 based on threshold value (f_(TH)). That is, each client 304 comparesthe current Δf to f_(TH). When Δf exceeds f_(TH), then the client 304updates the frequency data location 400, i.e., increments or decrementsRem_Access_Val with the current Δf. According to a non-limitingembodiment, f_(TH) can by dynamically adjusted as the access frequencyrate increases or decreases. For instance, when Rem_Access_Val is high,thus indicating the data location 310 is currently popular, the f_(TH)can be set to a first value. As Rem_Access_Val decreases, the f_(TH) canbe adjusted to a different value, and vice versa.

According to a non-limiting embodiment, the cache management system 300is configured to execute one or more restoration actions if the system300 encounters an error event. In the event one or more clients 304 failor crash, for example, the server initiates a reset operation. The resetoperation begins with the server 302 globally outputting a reset bit(e.g., 1 bit) indicating to all clients 304 that the cache managementsystem 300 will be reset. In response to receiving the reset bit, theclients 304 refrain from updating the frequency data location 400. Thereset bit may be output a single time or may be continuously output sothat it can be assured each client 304 has received the reset bit.

When the server 302 is ready to reinstate access frequency updates, theserver 302 will transition the reset bit from 1 to 0. In response to abit transition, the servers 304 will again add an initial contributionf1 (as opposed to Δf) to the frequency data location 400 during thefirst time period (T1) following the reset, and will subsequently updatethe frequency data location 400 with Δf in the following time periods asdiscussed above. In at least another embodiment, the clients 304 wait apredetermined amount of time in response to receiving the reset bit(e.g., 0 or 1) before updating the frequency data location 400. Thereset bit can be delivered using a separate individual signal and/or canbe a high order bit embedded in another data signal such as, forexample, the remote pointer.

Referring to FIGS. 5-6, flow diagrams illustrate the operation of aclient and server, respectively, included in a cache management systemaccording to a non-limiting embodiment. Each of the client and theserver execute dual thread methods during operation. Turning first tothe client operation illustrated in FIG. 5, a first thread (Thread A)begins at operation 500A, and at operation 502A the client receivesrequests for items located in a data location remotely stored in aserver. The request may be initiated, for example, by an applicationoperating in accordance with the client. At operation 504A, the clientfetches a data value or data item from the data location remotely storedin the server. The item may be fetched using a remote pointer inaccordance to an atomic fetch/add operation under RDMA and/or using amessage-based protocol including, for example, TCP/IP. The remotepointer utilizes a hash <key,value> corresponding to a data locationstoring the item requested by the application. At operation 506A, thefetched item is relayed from the client to the application. At operation508A, the client locally updates the expiration time (i.e., the currentlease period) of the data location corresponding to the remote pointerof the requested item. At operation 510A, the client locally updates theaccess frequency rate of the data location corresponding to the remotepointer of the requested item, and the method ends at operation 512A.

Still referring to FIG. 5, the client may simultaneously operateaccording to a second thread (Thread B). Thread B begins at operation500B, and at operation 502B the client loops through all items or datavalues requested by one or more applications. At operation 504B, theclient computes changes in access frequency rates. According to anon-limiting embodiment, the client determines an access frequency ratedifferential (Δf) based on a first time period (T1) and a followingsecond time period (T2). At operation 506B, the client determines thatΔf is greater than a frequency threshold (f_(TH)). At operation 508B,the client updates a frequency data location on the server according toan atomic add/fetch operation, and the method ends at operation 510B.

Turning now to FIG. 6, flow diagrams illustrate the operation of theserver. A first server thread (Thread A) begins at operation 600A, andat operation 602A the server accepts receives a messages and operationsfrom one or more clients. According to a non-limiting embodiment, theserver receives a request for a valid remote pointer <key,value>. Atoperation 604A, the server returns the valid remote pointer <key,value>and the item corresponding to the remote pointer to the client. Atoperation 606A, the server updates a frequency data location in responseto accessing the corresponding data location and the method ends atoperation 608A.

Still referring to FIG. 6, the server may simultaneously operateaccording to a second thread (Thread B). Thread B begins at operation600B, and at operation 602B the server dynamically tunes the leaseperiod for item stored in a corresponding data location based on theaccess frequency rate of the data location. At operation 604B, theserver assigns the tuned lease period to the corresponding datalocation. At operation 606B, the server reclaims the data location whenthe lease period expires, and the method ends at operation 608B.

According to various embodiments described above, a cache managementsystem is provided that is configured to perform cache management forRemote Direct Memory Access (RDMA) key/value data store based on atomicoperations. In at least one non-limiting embodiment, one or more serversare configured to dynamically compute a lease period based on thepopularity of a data location. In at least one embodiment, the serverdetermines the popularity of a data location based on an accessfrequency rate of the data location. The access frequency rate iscontinuously updated according to atomic fetch/add operations performedby the clients included in the cache management system. Based on theaccess frequency rate, the server dynamically tunes a lease period ofthe data location. The lease time stands as a pact between server andclient to guarantee the availability of the data so that clients canefficiently retrieve the data by using RDMA Read, while also preventingpremature eviction and reclamation of key/value items stored in thecache. In this manner, the cache management system according to variousembodiments is capable of specifically keeping track of the accessfrequency of the cached data thereby incurring very little overheadwhile also preserving the validity of key/value items in the cache.

As will be appreciated by one skilled in the art, one or more aspects ofthe present invention may be embodied as a system, method or computerprogram product. Accordingly, one or more aspects of the presentinvention may take the form of an entirely hardware embodiment, anentirely software embodiment (including firmware, resident software,micro-code, etc.) or an embodiment combining software and hardwareaspects that may all generally be referred to herein as a “circuit,”“module” or “system”. As used herein, the term “module” may refer to anapplication specific integrated circuit (ASIC), an electronic circuit,an electronic computer processor (shared, dedicated, or group), amicrocontroller, and memory that executes one or more software orfirmware programs, a combinational logic circuit, and/or other suitablecomponents that provide the described functionality. When implemented insoftware, a module can be embodied in memory as a non-transitorymachine-readable storage medium readable by a processing circuit andstoring instructions for execution by the processing circuit forperforming a method. Furthermore, one or more aspects of the presentinvention may take the form of a computer program product embodied inone or more computer readable medium(s) having computer readable programcode embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readablestorage medium. A computer readable storage medium may be, for example,but not limited to, an electronic, magnetic, optical, electromagnetic,infrared or semiconductor system, apparatus, or device, or any suitablecombination of the foregoing. More specific examples (a non-exhaustivelist) of the computer readable storage medium include the following: anelectrical connection having one or more wires, a portable computerdiskette, a hard disk, a random access memory (RAM), a read-only memory(ROM), an erasable programmable read-only memory (EPROM or Flashmemory), an optical fiber, a portable compact disc read-only memory(CD-ROM), an optical storage device, a magnetic storage device, or anysuitable combination of the foregoing.

In the context of this document, a computer readable storage medium maybe any tangible medium that can contain or store a program for use by orin connection with an instruction execution system, apparatus, ordevice. A computer readable storage medium, as used herein, is not to beconstrued as being transitory signals per se, such as radio waves orother freely propagating electromagnetic waves, electromagnetic wavespropagating through a waveguide or other transmission media (e.g., lightpulses passing through a fiber-optic cable), or electrical signalstransmitted through a wire.

Program code, when created and stored on a tangible medium (includingbut not limited to electronic memory modules, random access memory(RAM), dynamic RAM (DRAM), non-battery-back RAM, non-volatile RAM(NVRAM), ROM (including PROM, EEPROM, etc.), flash memory, Compact Discs(CDs), DVDs, Magnetic Tape and the like is often referred to as a“computer program product”. The computer program product medium istypically readable by a processing circuit preferably in a computersystem for execution by the processing circuit. Such program code may becreated using a compiler or assembler for example, to assembleinstructions, that, when executed perform aspects of the invention.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of embodiments. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of embodiments has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the embodiments in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the embodiments. Theembodiments were chosen and described in order to best explain theprinciples and the practical application, and to enable others ofordinary skill in the art to understand the embodiments with variousmodifications as are suited to the particular use contemplated.

Computer program code for carrying out operations for aspects of theembodiments may be written in any combination of one or more programminglanguages, including an object oriented programming language such asJava, Smalltalk, C++ or the like and conventional procedural programminglanguages, such as the “C” programming language, assembly language,machine language (including language used in microcode and embeddedimplementation), or other similar programming languages. The programcode may execute entirely on the user's computer, partly on the user'scomputer, as a stand-alone software package, partly on the user'scomputer and partly on a client or entirely on the client or server. Inthe latter scenario, the client may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of embodiments are described above with reference to flowchartillustrations and/or schematic diagrams of methods, apparatus (systems)and computer program products according to embodiments. It will beunderstood that each block of the flowchart illustrations and/or blockdiagrams, and combinations of blocks in the flowchart illustrationsand/or block diagrams, can be implemented by computer programinstructions. These computer program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments. In this regard, each block in the flowchart or blockdiagrams may represent a module, segment, or portion of code, whichcomprises one or more executable instructions for implementing thespecified logical function(s). It should also be noted that, in somealternative implementations, the functions noted in the block may occurout of the order noted in the figures. For example, two blocks shown insuccession may, in fact, be executed substantially concurrently, or theblocks may sometimes be executed in the reverse order, depending uponthe functionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts, or combinations of special purpose hardware andcomputer instructions.

1. A cache management system configured to perform cache management in aRemote Direct Memory Access (RDMA) key value data store, the cachemanagement system comprising an electronic hardware processor configuredto perform a method comprising: receiving a request from at least oneclient configured to access a data item stored in a data location of aremote server; determining a popularity of the data item based on afrequency at which the data location is accessed by the at least oneclient, the popularity of the data item determined using a RDMA remotepointer to perform an atomic fetch/add operation to update a frequencydata location stored in the remote server with access frequency dataindicating the frequency; and calculating a lease period of the dataitem based on the frequency and assigning the lease period to the datalocation.
 2. The cache management system of claim 1, wherein thefrequency is based on a frequency differential between a first frequencyduring a first time period and a second frequency during a secondsubsequent time period.
 3. The cache management system of claim 2,wherein the method further comprises dynamically tuning the lease periodbased on changes of the frequency differential.
 4. The cache managementsystem of claim 3, wherein the method further comprises deleting thefrequency from the frequency data location in response to an error eventso as to reset the cache management system.
 5. The cache managementsystem of claim 4, wherein the method further comprises deleting thedata item in response to expiration of the lease period such that theserver reclaims the data location. 6-11. (Canceled)
 12. A computerprogram product to perform cache management in a Remote Direct MemoryAccess (RDMA) key value data store, the computer program productcomprising: a tangible storage medium readable by a processing circuitand storing instructions for execution by the processing circuitconfigured to perform a method including operations comprising:receiving a request from at least one client configured to access a dataitem stored in a data location of a remote server; determining apopularity of the data item based on a frequency at which the datalocation is accessed by the at least one client, the popularitydetermined using a RDMA remote pointer to perform an atomic fetch/addoperation so as to update a frequency data location stored in the serverwith access frequency data indicating the frequency; and calculating alease period of the item based on the frequency and assigning the leaseperiod to the data location.
 13. The computer program product of claim12, wherein the method performed by the processing circuit furtherperforms an operation of determining the frequency based on a frequencydifferential between a first frequency during a first time period and asecond frequency during a second subsequent time period.
 14. Thecomputer program product of claim 13, wherein the method performed bythe processing circuit further performs an operation of dynamicallytuning the lease period as the frequency differential changes over time.15. The computer program product of claim 14, wherein the methodperformed by the processing circuit further performs an operation ofdeleting the frequency from the frequency data location in response toan error event so as to reset the cache management system.
 16. Thecomputer program product of claim 15, wherein the method performed bythe processing circuit further performs an operation of deleting thedata item in response to expiration of the lease period such that theserver reclaims the data location.
 17. A cache management systemconfigured to perform cache management in a Remote Direct Memory Access(RDMA) key value data store, the cache management system comprising: anelectronic data server including at least one data location configuredto store a data item; at least one electronic client located remotelyfrom the data server, the at least one client configured to access tothe data item stored in the at least one data location using a RDMAremote pointer, wherein the server determines a popularity of the dataitem based on a frequency at which the at least one data location isaccessed by the at least one client, calculates a lease period of thedata item based on the frequency, and assigns the lease period to the atleast one data location, the popularity determined using the RDMA remotepointer to perform an atomic fetch/add operation so as to update afrequency data location stored in the server with access frequency dataindicating the frequency.
 18. The cache management system of claim 17,wherein the server further includes a frequency data location, andwherein the at least one client updates the frequency data locationstored with access frequency data indicating the frequency according toan atomic fetch/add operation.
 19. The cache management system of claim18, wherein the frequency is based on a frequency differential between afirst frequency during a first time period and a second frequency duringa second subsequent time period.
 20. The cache management system ofclaim 19, wherein the client compares the frequency differential to athreshold value, and increments or decrements current access frequencydata stored in the frequency data location with the frequencydifferential in response to the frequency differential exceeding thethreshold value.
 21. The cache management system of claim 19, whereinthe server dynamically tunes the lease period as the frequencydifferential changes over time.
 22. The cache management system of claim21, wherein server determines an error event of the cache managementsystem, an in response to the error event the server performs at leastone recover operation, the recovery operation comprising: outputting afirst signal requesting the at least one client to halt updating thefrequency data location; deleting the frequency from the frequency datalocation; and outputting a second signal reinstating the at least oneclient to update the frequency data location.
 23. The cache managementsystem of claim 22, wherein the server deletes the data item in responseto expiration of the lease period such that the server reclaims the datalocation.